#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int findMaxConsecutiveOnes(int* nums, int numsSize) {
    int count = 0;
    int max = 0;
    for (int i = 0; i < numsSize; i++)
    {
        if (nums[i] == 1)
            count++;
        else if(nums[i]==0)
        {
            if (count > max)
                max = count;
            count = 0;
        }
    }
    if (count > max)
        max = count;
    return max;
}

int main()
{
	int arr[] = { 1,1,0,1,1,1 };
    int len = sizeof(arr) / sizeof(arr[0]);
    int max=findMaxConsecutiveOnes(arr, len);
    printf("%d", max);
	return 0;
}